<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="jquery-1.11.1.js"></script>
    <script>
        $(function(){
            $("#btn").on("click",function (e) {
                console.log(e);
            })

            $("div").on("click",function(e){
              // e.stopPropagation();
                console.log(e);
                alert("div");
            })

            $("#btndiv").on("click",function(e){

                //阻止事件冒泡
                e.stopPropagation();
                console.log(e);
                alert("input");
            })
        })
    </script>
</head>
<body>
    <input type="button" value="按钮" id="btn"/>
    <div>
        <input type="button" value="div中的按钮" id="btndiv">
    </div>
</body>
</html>